<% if Tr8n::Config.enabled? and (Tr8n::Config.open_registration_mode? or Tr8n::Config.current_user_is_translator?) %>
  	<% opts[:label] ||= tr8n_language_name_tag(Tr8n::Config.current_language, opts.merge(:name => :native, :linked => false)) %>

		<% if opts[:lightbox] %>
	    <%=link_to_function(opts[:label], "Tr8n.UI.Lightbox.show('/tr8n/language/select?lightbox=true', {height:500, width:400})")%>
		<% else %>
	    <span style="<%=opts[:style]%>; cursor:pointer;" onClick="Tr8n.UI.LanguageSelector.toggle();">
				<% if opts[:show_arrow] %>
				 <div style="float:right;margin-left:5px;margin-top:5px;width:0;height: 0;border-left: 5px solid transparent;border-right: 5px solid transparent;border-top: 5px solid black;" id="tr8n_language_selector_trigger"></div>
				<% end %>
			  <%= opts[:label] %>
	    </span>
		<% end %>
<% end %>